<template>
    <div>
        <mt-swipe :auto="4000" class="bg">
            <mt-swipe-item v-for="(img,index) in imgs" :key="index">
                <a :href="img.img_url">
                    <img :src="img.swiper_img">
                </a>
            </mt-swipe-item>
        </mt-swipe>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                imgs:[]
            }
        },
        components: {},
        props: ['url'],
        created() {
            this.$ajax.get(this.url)
            .then((res) => {
                this.imgs = res.data.message;
            }).catch((err) => {
                console.log(err);
                
            });
        },
        mounted() {}
    }
</script>

<style scoped>
   /*轮播图样式*/
  
  .mint-swipe {
    height: 187px;
  }
  
  .mint-swipe img {
    /* height: 100%; */
    width: 100%;
  }  
</style>